@charset 'utf-8';
@import '../../components/customized-variables.less';
@import '../../../components/bootstrap/less/mixins.less';

.container {
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

.input-group {
  input {
    height: 40px;
  }

  textarea {
    padding: 10px;
    height: 100px;
    resize: none;
  }

  .form-control {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .input-group-addon {
    padding: 6px 20px;
    border-radius: 0;
  }
}

.iconpicker-popover {
  max-width: 360px;
  width: 360px;
  background: #fff;
  border-color: #eee;
  border-radius: 0;
  box-shadow: none;

  .arrow {
    border-bottom-color: #eee;
  }

  .popover-content {
    padding: 5px;
  }

  .iconpicker {
    padding: 4px 9px;
    max-height: 200px;
    overflow-y: auto;

    a {
      display: block;
      float: left;
      padding: 6px;
      margin: 4px;
      width: 72px;
      height: 60px;
      text-align: center;


      &:hover {
        background-color: #e6e6e6;
      }

      i {
        width: 60px;
        color: #333;
        font-size: 32px;
      }

      span {
        display: block;
        width: 60px;
        height: 16px;
        color: #666;
        font-size: 12px;
        overflow: hidden;
      }
    }
  }
}

.wrap {
  position: relative;
}

.feedback {
  position: fixed;
  left: 20px;
  bottom: 20px;
  width: 36px;
  height: 36px;
  text-align: center;
  line-height: 36px;
  font-size: 20px;
  z-index: 1000;
  background: rgba(0,0,0,0.2);
  border-radius: 50%;
  color: @starry-color-white !important;

  i {
    transform: scale(-1,1);
  }
}

// 列表
.list {
  position: absolute;
  left: 0;
  top: 0;
  z-index: @bige-index;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  background: @starry-color-default;
  transition: transform 0.5s cubic-bezier(.6,0,.4,1);
  transform: translate(0,0);

  .container {
    @media (min-width: @screen-sm-min) {
      width: @container-sm;
    }
  }

  .header {
    margin-top: 30px;
    .clearfix();

    a {
      color: darken(@starry-color-white, 10%);

      &:hover {
        color: @starry-color-white;
      }
    }
  }

  .logo, .header-actions {
    display: block;
  }

  .logo svg path {
    fill: @starry-color-white;
  }

  .items {
    margin-bottom: 60px;
  }

  .item {
    position: relative;
    display: block;
    margin: 8px auto;
    padding: 18px 20px;
    width: 100%;
    line-height: 40px;
    font-size: 24px;
    background: @starry-color-white;
    color: lighten(@starry-color-black, 10%);
    border-radius: 4px;
    transition: opacity .3s, background .3s, color .3s;

    &:hover {
      background: darken(@starry-color-white, 10%);
    }

    &.add {
      text-align: center;
      .opacity(0.95);
    }

    &.fadeOut {
      .opacity(0.01);
    }

    .cover {
      display: block;
      margin-right: 20px;
      width: 40px;
      height: 40px;
      background-color: #ccc;
      background-position: center;
      background-size: cover;
      background-repeat: no-repeat;
    }

    .actions {
      position: absolute;
      display: block;
      right: 30px;
      top: 18px;
      height: 40px;

      span {
        line-height: 40px;
        color: darken(@starry-color-white, 20%);

        &:hover {
          color: darken(@starry-color-white, 50%);
        }
      }

      .remove, .cancel {
        display: none;
      }

      &.open {
        .trash {
          display: none;
        }

        .remove, .cancel {
          display: inline-block;
        }
      }
    }
  }
}

// 详情
.detail {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  min-height: 100%;
  overflow: hidden;

  &.change {
    position: fixed;
  }

  .container {
    padding: 0;
  }

  .navbar-brand {
    position: absolute;
    top: 20px;
    left: 30px;
    font-size: 16px;
    line-height: 36px;

    i {
      font-size: 18px;
    }
  }

  .replace-background-button {
    position: absolute;
    right: 30px;
    bottom: 20px;
    width: 36px;
    line-height: 36px;
    text-align: center;
    font-size: 24px;
    .opacity(0.5);

    &:hover {
      .opacity(1);
    }

    .loading {
      font-size: 16px;
      display: none;
      transform-origin: 50% 50%;
      animation: loading 1s infinite linear;
    }

    .instructions {
      display: block;
    }

    &.loading {
      .loading {
        display: block;
      }

      .instructions {
        display: none;
      }
    }
  }

  .profile-image {
    i {
      display: block;
      text-align: center;
      line-height: 200px;
      font-size: 28px;
      color: darken(@starry-color-white, 1%);
    }

    .loading {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      font-size: 18px;
      display: none;
      transform-origin: 50% 50%;
      animation: loading 1s infinite linear;
    }

    .instructions {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      border: none;
      overflow: hidden;
      background: transparent;
      backface-visibility: hidden;
      background-color: lighten(@starry-color-black, 25%);
      border-radius: 50%;
    }

    &.loading {
      .loading {
        display: block;
      }

      .instructions {
        display: none;
      }
    }

    &.done {
      .instructions {
        display: none;
      }

      &:not(.loading):hover .instructions {
        display: block;
        background-color: rgba(0,0,0,.5);
      }
    }
  }

  .theme-actions {
    position: absolute;
    top: 20px;
    left: 10px;

    a {
      display: inline-block;
      margin-right: 5px;
      width: 24px;
      height: 24px;
      border-radius: 12px;

      &.black {
        background: @starry-color-black;
      }

      &.gray {
        background: @starry-color-gray;
      }

      &.green {
        background: @starry-color-green;
      }

      &.blue {
        background: @starry-color-blue;
      }

      &.pink {
        background: @starry-color-pink;
      }

      &.red {
        background: @starry-color-red;
      }
    }
  }

  .method-actions {
    position: absolute;
    top: 10px;
    right: 10px;

    a {
      display: inline-block;
      position: relative;
      margin-right: 10px;
      font-size: 18px;

      span {
        display: none;
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translate(-50%, 0);
        font-size: 14px;
        white-space:nowrap;
      }

      &:hover span {
        display: block;
      }
    }
  }

  .profile, .profile-edit {
    .btn {
      outline: none;
      background-color: transparent;
      border-radius: 0;
    }
  }

  .section-title {
    .actions {
      display: inline-block;
      visibility: hidden;

      a {
        display: inline-block;
        position: relative;
        margin-right: 10px;
        font-size: 18px;
        color: inherit;

        span {
          display: none;
          position: absolute;
          top: 100%;
          left: 50%;
          transform: translate(-50%, 10px);
          font-size: 15px;
          white-space:nowrap;
        }

        &:hover span {
          display: block;
        }
      }
    }

    .section-rename {
      display: none;
      width: 240px;

      .input-group {
        border: 1px solid #fff;

        label, input {
          border: none;
        }
      }

      button {
        display: none;
      }
    }

    .confirm {
      display: inline-block;
      position: relative;

      .remove, .cancel {
        display: none;
      }

      &.open {
        .trash {
          display: none;
        }

        .remove {
          position: absolute;
          top: 100%;
        }

        .remove, .cancel {
          display: block;
        }
      }
    }

    &.edit {
      .actions, .name {
        display: none;
      }

      .section-rename {
        display: inline-block;
      }
    }
  }

  .section:hover .section-title .actions {
    visibility: visible;
  }

  .section-add {
    padding: 5px 20px;
    margin-bottom: -20px;
    text-align: right;

    .input-group {
      width: 120px;
      display: inline-block;
      border: 1px solid #fff;
      overflow: hidden;
      transition: width .5s ease;

      label {
        position: absolute;
        left: 0;
        padding: 0;
        margin: 0;
        width: 118px;
        line-height: 40px;
        background: none;
        border: none;
        border-radius: 0;
      }

      input {
        display: block;
        padding: 10px;
        margin-left: 120px;
        height: 40px;
        width: ~'calc(100% - 120px)';
        line-height: 1em;
        background: none;
        border: none;
        border-radius: 0;

        &::placeholder {
          color: inherit;
        }
      }
    }

    button {
      display: none;
    }
  }

  .section-add .input-group {
    &:hover, &.open {
      width: 300px;
    }
  }

  .section-header .content, .point-add, .point-edit {
    .profile-edit {
      display: none;
      padding: 20px;
    }

    .input-group {
      width: 100%;
      margin-bottom: 10px;
    }

    &.edit {
      .profile {
        display: none;
      }

      .profile-edit {
        display: block;
      }
    }
  }

  .point {
    &.show-picture {
      margin-bottom: 60px;
    }

    &.point-data .circle {
      cursor: move;
    }

    &:hover {
      .actions {
        display: block;
      }
    }

    .top {
      position: relative;
      margin-top: -10px;
      width: 100%;
      height: 10px;
    }

    .actions {
      position: absolute;
      display: none;
      bottom: 100%;
      right: 0;
      border-width: 1px;
      border-style: solid;
      font-size: 0;

      a {
        display: inline-block;
        width: 36px;
        height: 36px;
        line-height: 36px;
        text-align: center;
        font-size: 16px;
      }

      .confirm {
        display: inline-block;
      }

      .remove, .cancel {
        display: none;
      }

      .confirm.open {
        .trash {
          display: none;
        }

        .remove, .cancel {
          display: inline-block;
        }
      }
    }

    .btn-picture {
      .loading {
        width: 15px;
        display: none;
        transform-origin: 50% 50%;
        animation: loading 1s infinite linear;
      }

      .instructions {
        display: block;
      }

      &.loading {
        .loading {
          display: block;
        }

        .instructions {
          display: none;
        }
      }
    }
  }

  .point-placeholder .point-container {
    height: 100%;
    border: 1px dashed #000;
  }

  .point-right + .section-add {
    text-align: left;
  }

  .point-add, .point-edit {
    margin-left: auto;
    margin-right: 0;
    padding-top: 0;
    max-width: 400px;

    .btn {
      outline: none;
      background-color: transparent;
      border: 1px solid #fff;
      border-radius: 0;
    }

    .input-group {
      position: relative;
    }

    .bubble-icon {
      position: absolute;
      right: 0;
      width: 34px;
      line-height: 34px;
      font-size: 20px;
      text-align: center;
    }

    .chart.open {
      position: absolute;
      right: 7px;
      top: 7px;
      width: 20px;
      height: 20px;
      line-height: 18px;
      border-width: 1px;
      border-style: solid;
      border-radius: 50%;
    }
  }

  .point-right {
    .point-add, .point-edit {
      margin-left: 0;
      margin-right: auto;
    }

    .actions {
      left: 0;
      right: auto;
    }
  }
}

.bige .list {
  transform: translate(0,-100%);
}

@media (max-width: 600px) {
  .feedback {
    display: none;
  }

  .detail {
    .theme-actions {
      position: relative;
      display: inline-block;
      padding: 0;
      text-align: center;
    }

    .section-add .input-group {
      width: 100% !important;
      margin-top: 20px;
    }

    .section .point {
      margin-top: 50px;

      .point-add, .point-edit {
        margin-left: 0;
        margin-right: auto;
      }

      .actions {
        left: 0;
        right: auto;
      }
    }
  }
}

.touch .feedback {
  display: none;
}

.touch .detail {
  .method-actions {
    display: none;
  }

  .section-add .input-group {
    width: 100% !important;
    margin-top: 20px;
  }

  .section-title .actions {
    visibility: visible;

    a:hover span {
      display: none;
    }
  }

  .section .point {
    margin-top: 50px;

    .actions {
      display: block;
    }
  }
}




